<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style>
.td_item {
    height:30px; 
    line-height: 30px; 
    width: 100%;   
    vertical-align: middle; 
    margin:0px; 
    padding:0px 0px 0px 0px; 
    overflow: hidden;
    border-top:solid 1px #b7d1e6;
}

.td_item2 {
	height: 30px;
	line-height: 30px;
	width: 100%;
	vertical-align: middle;
	margin: 0px;
	padding: 0px 0px 0px 0px;
	overflow: hidden;
	
}

.checkboxWidth {
	width: 200px;
}

.td_item_span {
	display: block;
	text-align: center;
	width: 71% !important;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code">
	<x:out select="$xmlData/data/proposal/grant_code" />
</c:set>
<c:set var="sub_grant_code">
	<x:out select="$xmlData/data/proposal/sub_grant_code" />
</c:set>
<c:set var="nature_value">
	<x:out
		select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />
</c:set>

<c:if test="${grant_code==635}">
	<!-- 635国家基础科学人才培养基金 -->
	<c:set var="Class">class="gray" </c:set>
</c:if>
<div style="margin-bottom: 5px;">
    		<strong>温馨提示：</strong><br/>
    		<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
    		单位财务信息从【单位维护表】中导入，由单位管理员填写，如有疑问请联系单位管理员进行修改。 
    		</security:authorize>
    		<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
    		单位财务信息从【单位维护表】中导入，如有数据需要调整，请您到【系统管理】->【单位信息维护】功能进行修改 。
    		</security:authorize>
</div>
<div class="t_bar">单位财务情况（单位：万元）</div>
<table width="100%" border="0" cellpadding="0" cellspacing="1"
	id="finances" class="t_css">
	<tr class="t_tr">
		<td align="center" width="20%">指标</td>
		<td align="center" width="27%">大前年度（${year-3 }）年</td>
		<td align="center" width="27%">前年度（${year-2 }）年</td>
		<td align="center" width="27%">上年度（${year-1 }）年</td>
	</tr>
	<!-- 企业财务 -->
	<c:set var="finance_items"
		value="&nbsp;&nbsp;营业（销售）收入,&nbsp;&nbsp;其中：主营业务收入,&nbsp;&nbsp;主营业务收入增长率（%）,&nbsp;&nbsp;新产品销售收入,&nbsp;&nbsp;技术性及高新技术产品收入,&nbsp;&nbsp;技术性及高新技术产品收入占比（%）,&nbsp;&nbsp;工业总产值,&nbsp;&nbsp;增加值,&nbsp;&nbsp;出口总额(万美元),&nbsp;&nbsp;利润总额,&nbsp;&nbsp;主营业务利润,&nbsp;&nbsp;净利润,&nbsp;&nbsp;纳税总额,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，增值税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，营业税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，企业所得税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，个人所得税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，其他税,&nbsp;&nbsp;研发经费支出总额,&nbsp;&nbsp;研发经费占销售收入比例（%）,&nbsp;&nbsp;年末资产总额,&nbsp;&nbsp;其中：年末固定资产净值,&nbsp;&nbsp;年负债总额,&nbsp;&nbsp;资产负债率（%）,&nbsp;&nbsp;总现金流量净额,&nbsp;&nbsp;经营活动现金流量净额,&nbsp;&nbsp;经营活动现金流入总额,&nbsp;&nbsp;经营活动现金流出总额"
		scope="page"></c:set>
	<c:if test="${fn:substring(nature_value,0,1)=='A' }">
		<tr class="li_1" id="finance_enterprise">
			<td style="padding: 0px">
			     <c:forEach items="${fn:split(finance_items, ',') }" var="item" varStatus="sta">
					<div class="td_item" 
						<c:if test="${sta.index%2!=0 }">style="background:#f1f1f1;"</c:if>><span style="text-align:left">${item}</span></div>
				</c:forEach>
		    </td>
			<c:set value="1" var="index" scope="page" />
			<x:forEach select="$xmlData/data/organization/finances/finance"
				var="finance" varStatus="finSta">
				<c:if test="${finSta.index>0 }">
					<c:set var="finance_type">
						<x:out select="$finance/@type" />
					</c:set>
					<c:if test='${finance_type=="企业财务" }'>
						<c:if test="${index==1||index==2||index==4 }">
							<td style="border-left: 1px solid #FFF;"><c:choose>
									<c:when test="${index==1 }">
										<input type="hidden"
											name="organization/finances/finance[${index }]@year"
											value="${year-3 }" />
									</c:when>
									<c:when test="${index==2 }">
										<input type="hidden"
											name="organization/finances/finance[${index }]@year"
											value="${year-2 }" />
									</c:when>
									<c:when test="${index==4 }">
										<input type="hidden"
											name="organization/finances/finance[${index }]@year"
											value="${year-1 }" />
									</c:when>
								</c:choose> <input type="hidden"
								name="organization/finances/finance[${index }]@sequence_no"
								value="${index+1 }" /> <input type="hidden"
								name="organization/finances/finance[${index }]@type"
								value="企业财务" />
								<div class="td_item">
									<span id="finance_90_${index }" 
										name="organization/finances/finance[${index }]/income"><x:out
											select="$finance/income" /></span>
								</div>
								<div class="td_item">
									<span id="finance_91_${index }" 
										name="organization/finances/finance[${index }]/income_main"><x:out
											select="$finance/income_main" /></span>
								</div>
								<div class="td_item">
									<span id="finance_95_${index }" 
										name="organization/finances/finance[${index }]/increase"><x:out select="$finance/increase" /></span>
								</div>
								<div class="td_item">
									<span id="finance_98_${index }" 
										name="organization/finances/finance[${index }]/income_sale"><x:out
											select="$finance/income_sale" /></span>
								</div>
								
								<div class="td_item">
									<span id="finance_92_${index }" 
										name="organization/finances/finance[${index }]/income_hightech"><x:out
											select="$finance/income_hightech" /></span>
								</div>
								<div class="td_item">
									<span id="finance_93_${index }" 
										name="organization/finances/finance[${index }]/income_hightech_pre"><x:out
											select="$finance/income_hightech_pre" /></span>
								</div>
								<div class="td_item">
									<span id="finance_94_${index }" 
										name="organization/finances/finance[${index }]/output"><x:out
											select="$finance/output" /></span>
								</div>
								<div class="td_item">
									<span id="finance_96_${index }" 
										name="organization/finances/finance[${index }]/added"><x:out
											select="$finance/added" /></span>
								</div>
								
								<div class="td_item">
									<span id="finance_914_${index }" 
										name="organization/finances/finance[${index }]/export"><x:out
											select="$finance/export" /></span>
								</div>
								<div class="td_item">
									<span name="organization/finances/finance[${index }]/proft_total"><x:out
											select="$finance/proft_total" /></span>
								</div>
								<div class="td_item">
									<span id="finance_916_${index }" 
										name="organization/finances/finance[${index }]/proft_main"><x:out
											select="$finance/proft_main" /></span>
								</div>
								<div class="td_item">
									<span id="finance_917_${index }" 
										name="organization/finances/finance[${index }]/proft"><x:out
											select="$finance/proft" /></span>
								</div>
								<div class="td_item">
									<span id="finance_919_${index }" 
										name="organization/finances/finance[${index }]/fax"><x:out
											select="$finance/fax" /></span>
								</div>
								<div class="td_item">
									<span id="finance_920_${index }" 
										name="organization/finances/finance[${index }]/fax_added"><x:out
											select="$finance/fax_added" /></span>
								</div>
								<div class="td_item">
									<span id="finance_921_${index }" 
										name="organization/finances/finance[${index }]/fax_bussiness"><x:out
											select="$finance/fax_bussiness" /></span>
								</div>
								<div class="td_item">
									<span id="finance_922_${index }" 
										name="organization/finances/finance[${index }]/fax_income"><x:out
											select="$finance/fax_income" /></span>
								</div>
								<div class="td_item">
									<span id="finance_923_${index }" 
										name="organization/finances/finance[${index }]/fax_personal"><x:out
											select="$finance/fax_personal" /></span>
								</div>
								<div class="td_item">
									<span id="finance_924_${index }" 
										name="organization/finances/finance[${index }]/fax_other"><x:out
											select="$finance/fax_other" /></span>
								</div>
								<div class="td_item">
									<span id="finance_925_${index }" 
										name="organization/finances/finance[${index }]/yanfa_income"><x:out
											select="$finance/yanfa_income" /></span> <input
										id="finance_938_${index }" type="hidden"
										name="organization/finances/finance[${index }]/relief_income_yanfa"
										value="<x:out select="$finance/relief_income_yanfa" />"
										type="text" class="hn_iuput_kuang2 gray"
										style="text-align: right" />
								</div>
								<div class="td_item">
									<span id="finance_927_${index }" 
										name="organization/finances/finance[${index }]/yanfa_income_pre"><x:out
											select="$finance/yanfa_income_pre" /></span>
								</div>

								<div class="td_item">
									<span id="finance_930_${index }" 
										name="organization/finances/finance[${index }]/assets"><x:out
											select="$finance/assets" /></span>
								</div>
								<div class="td_item">
									<span id="finance_931_${index }" 
										name="organization/finances/finance[${index }]/assets_fixed"><x:out
											select="$finance/assets_fixed" /></span>
								</div>
								<div class="td_item">
									<span id="finance_932_${index }" 
										name="organization/finances/finance[${index }]/liabilities"><x:out
											select="$finance/liabilities" /></span>
								</div>
								<div class="td_item">
									<span id="finance_935_${index }" 
										name="organization/finances/finance[${index }]/liabilities_pre"><x:out
											select="$finance/liabilities_pre" /></span>
								</div>
								<div class="td_item">
									<span id="finance_935_${index }" 
										name="organization/finances/finance[${index }]/caseflow"><x:out
											select="$finance/caseflow" /></span>
								</div>
								<div class="td_item">
									<span 
										name="organization/finances/finance[${index }]/caseflow_active"><x:out
											select="$finance/caseflow_active" /></span>
								</div>
								<div class="td_item">
									<span id="finance_933_${index }"
										name="organization/finances/finance[${index }]/caseflow_active_in"><x:out
											select="$finance/caseflow_active_in" /></span>
								</div>
								<div class="td_item">
									<span id="finance_934_${index }"
										name="organization/finances/finance[${index }]/caseflow_active_out"><x:out
											select="$finance/caseflow_active_out" /></span>
								</div></td>
						</c:if>

						<c:set value="${index+1 }" var="index" scope="page" />
					</c:if>
				</c:if>
			</x:forEach>
		</tr>

	</c:if>
	<!-- 事业财务 -->
	<c:set var="finance_items"
		value="&nbsp;&nbsp;年度总收入,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(一)生产经营收入,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(二)科技活动收入,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(三)其他收入,&nbsp;&nbsp;年度总收入增长率(%),&nbsp;&nbsp;年度总支出,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.生产经营支出,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.科技活动支出,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.其他支出,&nbsp;&nbsp;年末资产总额,&nbsp;&nbsp;年末固定资产原值,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.年末科研用房原值,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.年末科研设备原值,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.其他固定资产原值,&nbsp;&nbsp;固定资产增长率(%),&nbsp;&nbsp;科研设备资产增长率(%),&nbsp;&nbsp;年末负债总额"
		scope="page"></c:set>

	<tr class="li_1" id="finance_career"
		<c:if test="${fn:substring(nature_value,0,1)=='A' }">style="display:none"</c:if>>
		<td style="padding: 0px"><c:forEach
				items="${fn:split(finance_items, ',') }" var="item" varStatus="sta">
				<div class="td_item"
					<c:if test="${sta.index%2!=0 }">style="background:#f1f1f1;"</c:if>>${item
					}</div>
			</c:forEach></td>
		<c:set value="1" var="index" scope="page" />
		<x:forEach select="$xmlData/data/organization/finances/finance"
			var="finance">
			<c:set var="finance_type">
				<x:out select="$finance/@type" />
			</c:set>
			<c:if test="${finance_type=='事业财务' }">
				<c:if test="${index==1||index==2||index==4 }">
					<td style="border-left: 1px solid #FFF;"><c:choose>
							<c:when test="${index==1 }">
								<input type="hidden"
									name="organization/finances/finance[${index }]@year"
									value="${year-3 }" />
							</c:when>
							<c:when test="${index==2 }">
								<input type="hidden"
									name="organization/finances/finance[${index }]@year"
									value="${year-2 }" />
							</c:when>
							<c:when test="${index==4 }">
								<input type="hidden"
									name="organization/finances/finance[${index }]@year"
									value="${year-1 }" />
							</c:when>
						</c:choose> <input type="hidden"
						name="organization/finances/finance[${index }]@sequence_no"
						value="${index+1 }" /> <input type="hidden"
						name="organization/finances/finance[${index }]@type" value="事业财务" />
						<div class="td_item">
							<span id="finance_0_${index }" 
								name="organization/finances/finance[${index }]/income"><x:out
									select="$finance/income" /></span>
						</div>
						<div class="td_item">
							<span id="finance_1_${index }" 
								name="organization/finances/finance[${index }]/income_product"><x:out
									select="$finance/income_product" /></span>
						</div>
						<div class="td_item">
							<span id="finance_2_${index }" 
								name="organization/finances/finance[${index }]/income_tech"><x:out
									select="$finance/income_tech" /></span>
						</div>
						<div class="td_item">
							<span id="finance_6_${index }" 
								name="organization/finances/finance[${index }]/income_other"><x:out
									select="$finance/income_other" /></span>
						</div>
						<div class="td_item">
							<span id="finance_7_${index }" 
								name="organization/finances/finance[${index }]/income_rate"><x:out
									select="$finance/income_rate" /></span>
						</div>
						<div class="td_item">
							<span id="finance_8_${index }" 
								name="organization/finances/finance[${index }]/outcome"><x:out
									select="$finance/outcome" /></span>
						</div>
						<div class="td_item">
							<span id="finance_9_${index }" 
								name="organization/finances/finance[${index }]/outcome_product"><x:out
									select="$finance/outcome_product" /></span>
						</div>
						<div class="td_item">
							<span id="finance_10_${index }" 
								name="organization/finances/finance[${index }]/outcome_tech"><x:out
									select="$finance/outcome_tech" /></span>
						</div>
						<div class="td_item">
							<span id="finance_11_${index }" 
								name="organization/finances/finance[${index }]/outcome_other"><x:out
									select="$finance/outcome_other" /></span>
						</div>
						<div class="td_item">
							<span id="finance_12_${index }" 
								name="organization/finances/finance[${index }]/assets"><x:out
									select="$finance/assets" /></span>
						</div>
						<div class="td_item">
							<span id="finance_13_${index }" 
								name="organization/finances/finance[${index }]/assets_fixed"><x:out
									select="$finance/assets_fixed" /></span>
						</div>
						<div class="td_item">
							<span id="finance_14_${index }" 
								name="organization/finances/finance[${index }]/assets_fixed_room"><x:out
									select="$finance/assets_fixed_room" /></span>
						</div>
						<div class="td_item">
							<span id="finance_15_${index }" 
								name="organization/finances/finance[${index }]/assets_fixed_equiment"><x:out
									select="$finance/assets_fixed_equiment" /></span>
						</div>
						<div class="td_item">
							<span id="finance_16_${index }" 
								name="organization/finances/finance[${index }]/assets_fixed_other"><x:out
									select="$finance/assets_fixed_other" /></span>
						</div>
						<div class="td_item">
							<span id="finance_17_${index }" 
								name="organization/finances/finance[${index }]/assets_fixed_rate"><x:out
									select="$finance/assets_fixed_rate" /></span>
						</div>
						<div class="td_item">
							<span id="finance_18_${index }" 
								name="organization/finances/finance[${index }]/assets_fixed_equiment_rate"><x:out
									select="$finance/assets_fixed_equiment_rate" /></span>
						</div>
						<div class="td_item">
							<span id="finance_19_${index }" 
								name="organization/finances/finance[${index }]/liabilities"><x:out
									select="$finance/liabilities" /></span>
						</div></td>
				</c:if>

				<c:set value="${index+1 }" var="index" scope="page" />
			</c:if>
		</x:forEach>

	</tr>
</table>
<br>
<div class="t_bar">
	主要产品情况
</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	id="tblProduct" cellspacing="1">
	<thead>
		<tr>
			<th class="TblHead" align="center" width="10%" nowrap>序号</th>
			<th class="TblHead" align="center" width="40%" nowrap>主要产品名称</th>
			<th class="TblHead" align="center" width="20%" nowrap>是否具有自主知识产权</th>
			<th class="TblHead" align="center" width="10%" nowrap>产品类型</th>
			<th class="TblHead" align="center" width="20%" nowrap>占企业销售收入总额比例（%）</th>
		</tr>
	</thead>
	<tbody id="tab">
	<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/product/goods" var="goods">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">

				<td align="center" nowrap="nowrap"><span
					name="product/goods[${flag}${index}]@sequence_no">${index+1}</span></td>
				<td align="center" nowrap="nowrap"><span
					name="product/goods[${flag}${index}]/gname"><x:out
							select="$goods/gname" /></span></td>
				<td align="center" nowrap="nowrap"><span
					name="product/goods[${flag}${index}]/is_property_right_name"><x:out
							select='$goods/is_property_right_name' /></span></td>
				<td align="center" nowrap="nowrap"><span
					name="product/goods[${flag}${index}]/goods_type_name"><x:out
							select='$goods/goods_type_name' /></span></td>

				<td align="center" nowrap="nowrap"><span
					name="product/goods[${flag}${index}]/percent"><x:out
							select="$goods/percent" /></span></td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
	</tbody>
</table>


<br>
<div class="t_bar">
	上年度具有自主知识产权产品经营情况（单位：万元）
</div>
<table class="t_css" id='ftable1' width="100%" border="0"
	cellpadding="0" cellspacing="1">
	<tr >
		<td  width="20%" align="right">产品销售收入：</td>
		<td  width="27%" align="center"><span name="product/income"><x:out
					select="$xmlData/data/product/income" /></span></td>
		<td  width="27%" align="right">净利润：</td>
		<td  width="27%" align="center"><span name="product/profit"><x:out
					select="$xmlData/data/product/profit" /></span></td>
	</tr>
	<tr align="center">
		<td align="right">纳税总额：</td>
		<td align="center"><span name="product/tax"><x:out
					select="$xmlData/data/product/tax" /></span></td>
		<td align="right">其中增值税总额：</td>
		<td align="center"><span name="product/added_tax"><x:out
					select="$xmlData/data/product/added_tax" /></span></td>
	</tr>
</table>
<script type="text/javascript">
	$(function() {
		if(${fn:substring(nature_value,0,1)=='A'}){
			//$("#finance_925_1").text(thousandsNumber(formatVal($("#finance_938_1").val().replace(/,/g,'') * 2)));
			//$("#finance_925_2").text(thousandsNumber(formatVal($("#finance_938_2").val().replace(/,/g,'') * 2)));
			//$("#finance_925_4").text(thousandsNumber(formatVal($("#finance_938_4").val().replace(/,/g,'') * 2)));

			$("#finance_927_1").text(thousandsNumber(formatVal($("#finance_925_1").text().replace(/,/g,'')  * 100/$("#finance_90_1").text().replace(/,/g,''))));
			$("#finance_927_2").text(thousandsNumber(formatVal($("#finance_925_2").text().replace(/,/g,'')  * 100/$("#finance_90_2").text().replace(/,/g,''))));
			$("#finance_927_4").text(thousandsNumber(formatVal($("#finance_925_4").text().replace(/,/g,'')  * 100/$("#finance_90_4").text().replace(/,/g,''))));
			
			$("#finance_935_1").text(thousandsNumber(formatVal($("#finance_932_1").text().replace(/,/g,'')*100/$("#finance_930_1").text().replace(/,/g,''))));
			$("#finance_935_2").text(thousandsNumber(formatVal($("#finance_932_2").text().replace(/,/g,'')*100/$("#finance_930_2").text().replace(/,/g,''))));
			$("#finance_935_4").text(thousandsNumber(formatVal($("#finance_932_4").text().replace(/,/g,'')*100/$("#finance_930_4").text().replace(/,/g,''))));
			
			$("#finance_95_1").text("/");
			$("#finance_95_2").text(thousandsNumber(formatVal(($("#finance_91_2").text().replace(/,/g,'')-$("#finance_91_1").text().replace(/,/g,''))*100/$("#finance_91_1").text().replace(/,/g,''))));
			$("#finance_95_4").text(thousandsNumber(formatVal(($("#finance_91_4").text().replace(/,/g,'')-$("#finance_91_2").text().replace(/,/g,''))*100/$("#finance_91_2").text().replace(/,/g,''))));
			
			$("#finance_93_1").text(formatNumberAutoex(((parseFloat($("#finance_92_1").text().replace(/,/g,'')/$("#finance_90_1").text().replace(/,/g,''))).toFixed(4)*1000000/10000).toString(),9,4,2));
			$("#finance_93_2").text(formatNumberAutoex(((parseFloat($("#finance_92_2").text().replace(/,/g,'')/$("#finance_90_2").text().replace(/,/g,''))).toFixed(4)*1000000/10000).toString(),9,4,2));
			$("#finance_93_4").text(formatNumberAutoex(((parseFloat($("#finance_92_4").text().replace(/,/g,'')/$("#finance_90_4").text().replace(/,/g,''))).toFixed(4)*1000000/10000).toString(),9,4,2));

		}
		
		$("#finance_enterprise").children("td:not(:first)").each(function(){
			setFinanceStyle($(this));
		});
		
		$("#finance_career").children("td:not(:first)").each(function(){
			setFinanceStyle($(this));
		});
	});
	
	/**
	 * 数字显示函数，适用于可输入四位小数或二位少数
	 * number:值
	 * maxIntLength:整数部分最大长度,
	 * maxDecimalLength:小数部分最大长度,
	 * displayDecimal:小数部分显示出的长度
	 */
	function formatNumberAutoex(number,maxIntLength,maxDecimalLength,displayDecimal) {
		if(number.indexOf(".")>=0){//如果是输入值中带有小数点则检查小数部分长度是否达到了最低显示的长度，如果没有则补0
			var integral="";
			var decimal="";
			if (number.indexOf(".")==0&&number.length>1){
				integral="0";
				decimal=number.substring(1,number.length);
			}else if (number.indexOf(".")>0){
				integral=number.substring(0,number.indexOf("."));
				decimal=number.substring(number.indexOf(".")+1,number.length);
			}
			var f=decimal.substring(displayDecimal,maxDecimalLength);
		    //小数四位，如果后两位为00，就去掉
			if(f=="00"){
				decimal=decimal.substring(0, displayDecimal);
			}else{
				decimal=decimal.substring(0, maxDecimalLength);
			}
			number=integral+"."+decimal;
		}else if (!$.isNumeric(number)) {
			number = "0.00";
		}else if (number!=""&&displayDecimal>0){ //输入的是整数则补上小数部分，全部为0
			number=number+".";
			for (var i=0;i<displayDecimal;i++){
				number=number+"0";
			}
		}
		return number;
	};
	
	/*
	 * 设置财务样式
	 */
	 function setFinanceStyle(obj) {
		obj.css("padding", "0").children("div:odd").css("background", "#f1f1f1");
		obj.find("input").css("width", 120).css("margin-top", "3px").css("height", "18px");
		obj.find("span").attr("style", "width: 95%; text-align: right; display: block;");
	 }
	 /**
	  * 将值以千分位显示
	  * @param value 数值
	  */
	 function thousandsNumber(value) {
	 	if (value == null || value == undefined || value == "") {
	 		return "";
	 	}
	 	var negative = '';
	 	var intVal = value.split(".")[0];
	 	var j = intVal.length;
	 	if(intVal.charAt(0) == '-'){
	 		negative = '-';
	 		intVal = intVal.substr(1, j);
	 	}
	 	j = intVal.length;
	 	for(var i=j-3; i>0; i=i-3){
	 		intVal = intVal.substr(0, i) + "," + intVal.substr(i, j);
	 	}
	 	if(value.split(".")[1] != null){
	 		return (negative + intVal + '.' + value.split(".")[1]);
	 	} else{
	 		return (negative + intVal);
	 	}
	 }
</script>

